/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-12-15 15:21:28
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 列表查询
export const getList = (params) => axios.post(`${SERVER.WHOLESALES}/orderGoodsSideC/queryList`, params)
export const getdeliveryList = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsDeliveryOrderSideC/selectByOrderIds`, params)
// 查询详情
export const getDetail = (params) => axios.get(`${SERVER.WHOLESALES}/ttVsDeliveryOrder/selectOne/${params.id}`, { params })

export const delByDeliveryId = (params) => axios.get(`${SERVER.WHOLESALES}/ttVsDeliveryOrderSideC/delOrder/${params.id}`, { params })
// 获取订单细分类型
export const getNotPage = (params) => axios.get(`${SERVER.WHOLESALES}/fiOrderTypeSub/searchFiOrderTypeSubDTOListNotPage`, { params })
// 自动配车
// export const getconfirmAutowired = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsDeliveryOrder/confirmAutowired`, params)
// // 经销商账户资金类型列表
// export const getTtFiAccountList = (params) => axios.post(`${SERVER.WHOLESALES}/ttFiAccount/list`, params)
// // 资金调整页面信息
// export const detailFundAdjust = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsDeliveryOrder/detailFundAdjust`, params)
// // 资金调整确认
// export const confirmFundAdjust = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsDeliveryOrder/confirmFundAdjust`, params)
// // 收车地址调整
// export const getconfirmAddressAdjust = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsDeliveryOrder/confirmAddressAdjust`, params)
// 导出
// export const exportList = (params) => axios.post(`${SERVER.WHOLESALES}/deliveryOrder/detail/export/dlr`, params, { responseType: 'blob' })
// 取消订单
export const postrejectOrder = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsDeliveryOrder/rejectOrder`, params)
// 获取事业部
export const getDeptList = (params) => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/org/getOrgByOrgType4cms`, { params })
// 获取办事处
export const getOfficeList = (params) => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/org/getOrgByOrgType4cms`, { params })
// 获取经销商收车地址
export const getDealerAddress = (params) => axios.get(`${SERVER.WHOLESALES}/dealerAddress/getDealerAddress`, { params })
// 获取所有资金类型
export const gettmFiAccountType = (params) => axios.post(`${SERVER.WHOLESALES}/tmFiAccountType/list`, params)
// 车辆配置五级选择
export const vehicleConfiguration = (id, params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/productInfo/productTreeNew`, { params: { type: id, level: 6, ...params } });
// 获取折扣详情
// export const getDiscountDetails = (params) => axios.get(`${SERVER.WHOLESALES}/orderGoods/getDiscountDetails`, { params })
// //获取经销商余额池
// export const getAmount = (params) => axios.get(`${SERVER.WHOLESALES}/orderGoods/getAmount`, {params})
// // / 导出
// export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);
// // 批量保存
export const saveList = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsDeliveryOrderSideC/saveListDLR`, params)
//  导出
export const exportDlrCheck = (params) => axios.post(`${SERVER.WHOLESALES}/orderGoodsSideC/exportDlrCheck`, params, { responseType: 'blob' })
